<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html>
<html>
<head>
	<meta content="text/html; charset=UTF-8">
	<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="js/jquery.validate.js"></script>
	<link rel="stylesheet" media="screen" type="text/css" href="css/footer.css" />
	<link rel="stylesheet" media="screen" type="text/css" href="css/registrazione.css" />
	
	<script type="text/javascript">
	$(document).ready(function() {
		$("#registrazione").validate({
				rules : {
					password : {
						required : true,
					    minlength : 5
					},
					conferma_password : {
						required : true,
						minlength : 5,
   						equalTo : "#password"
					},
					email : {
						email : true
					},
				},
				messages : {
					password:{
						minlength : "La password deve essere almeno di 5 caratteri"
					},
					conferma_password:{
						minlength : "La password deve essere almeno di 5 caratteri",
						equalTo : "le due password sono diverse",
					},
					email :{
						email : "il valore inserito non è un email"
					}
				}
		});
	});
	</script>
	<title>Registrazione</title>
</head>
<body>
<header>
	<h1>Pagina Registrazione</h1>
	<tiles:insertAttribute name="navmenu"  />
</header>
<div id="container">
	<form id="registrazione" action="registrazione.html" method="post">
		<label>email</label><input type="text" name="email" required="required" /> 
		<label>password</label><input id="password" type="password" name="password" required="required" />
		<label>conferma passord</label><input type="password" name="conferma_password" required="required" />
		<fieldset>
			<label><input type="radio" name="privilegi" value="1" />Amministratore</label>
			<label><input type="radio" name="privilegi" value="2" checked="checked"/>Utente</label>
			<!-- <label><input type="radio" name="tipo" value="3"/>Contenutista</label> -->
		</fieldset>
		<input type="hidden" name="abilitazioneUser" value="1" />
		<input type="submit" value="Invia" />
	</form>
	<div id="push-footer"></div>
	<tiles:insertAttribute name="footer"/>
</div>	
</body>
</html>